#include "MessageBox.h"


MessageBox::MessageBox(void)
{
}


MessageBox::~MessageBox(void)
{
}

int MessageBox::Show(UINT uIDMsg, HINSTANCE hInstMsg, UINT uIDCap, HINSTANCE hInstCap, UINT uType, HWND hWnd)
{
	const int TEXT_LENGTH = 160;
	wchar_t lpText[TEXT_LENGTH]={0}, lpCaption[TEXT_LENGTH]={0};

	if(uIDMsg)
		LoadStringW(hInstMsg, uIDMsg, lpText, TEXT_LENGTH);

	if(uIDCap)
	{
		if(!hInstCap && hInstMsg)
			hInstCap = hInstMsg;

		if(hInstCap)
			LoadStringW(hInstCap, uIDCap, lpCaption, TEXT_LENGTH);
	}

	return ::MessageBoxW(hWnd, lpText, lpCaption, uType);
}

int MessageBox::Show(LPCWSTR lpText, LPCWSTR lpCaption, UINT uType, HWND hWnd)
{
	return ::MessageBoxW(hWnd, lpText, lpCaption, uType);
}